#include "../include/EchoServer.h"
#include "../include/ConfigFile.h"
using namespace std;
int main(int argc, char **argv)
{
    //从配置文件中获取配置信息

    
    ConfigFile *conf = ConfigFile::getInstance();
    map<string,string> mp = conf->getConf();
    
    int threadNums = atoi(mp["threadNums"].c_str());
    int taskSize = atoi(mp["taskSize"].c_str());
    string ip = mp["ip"];
    unsigned short port = atoi(mp["port"].c_str());
    string dictEn = mp["dictEnPath"];
    string dictZh = mp["dictZhPath"];
    string indexEn = mp["indexEnPath"];
    string indexZh = mp["indexZhPath"];

    
    EchoServer es(threadNums, taskSize, ip, port, dictEn, dictZh, indexEn, indexZh);
    es.start();

    return 0;
}

